<script type="text/javascript" src="js/util.js?v=2022"></script>
<h2>JSCover</h2>
<p>
    <a href="https://github.com/tntim96/JSCover" target="_blank">JSCover</a> is a tool that measures code coverage for JavaScript programs.
    It is an enhanced Java implementation of the excellent
    <a href="http://siliconforks.com/jscoverage/" target="_blank">JSCoverage</a> tool.
    See the file-based version in action now using the
    <a href="example-qunit/out/jscoverage.html?test/index.html" target="_blank">Underscore test suite</a>.
    See the server-based report now for
    <a href="example-report-yui3/jscoverage.html" target="_blank">YUI3</a>.
</p>

<p>
    JSCover is free software, distributed under the
    <a href="license.html">GNU General Public License version 2</a>.
</p>

<h2>Why choose JSCover</h2>

<h3>Coverage Features</h3>
<ul>
    <li>Measures line, <a href="manual/manual.xml#branchCondition" target="_blank">branch/condition</a> and function coverage</li>
    <li>Coverage measured via a browser, allowing DOM interaction</li>
    <li><a href="manual/manual.xml#fileSystemSave" target="_blank">Run tests in file-system mode and still save the report</a></li>
    <li>
        Browser independent and can be run headless in
        <a href="manual/manual.xml#automatingHtmlUnit" target="_blank">HtmlUnit</a><!--
        and
        <a href="manual/manual.xml#automatingPhantomJS" target="_blank">PhantomJS</a>-->.
    </li>
    <li>
        Because test coverage is collected in-browser, multiple tests can be run concurrently and
        <a href="manual/manual.xml#reportMerging" target="_blank">report data merged</a>.
    </li>
    <li>
        Run JavaScript tests and collect coverage in a single Java test class with
        <a href="manual/manual.xml#automatingWebDriver" target="_blank">WebDriver</a>.
    </li>
    <li>
        Run multi-page tests without an iframe or JavaScript-connected window and still save the report using
        <a href="manual/manual.xml#localStorage" target="_blank">HTML5 Local Storage Switch</a>.
    </li>
    <li><a href="https://github.com/google/closure-compiler/wiki/ECMAScript6" target="_blank">ES6+ support as per the closure-compiler</a></li>
</ul>

<h3>Coverage Reports</h3>
<ul>
    <li>Stores report on the file-system</li>
    <li>Supports <a href="manual/manual.xml#reportMerging" target="_blank">test coverage results merging</a></li>
    <li>
        Multiple report formats supported (let us know what formats are required):
        <ul>
            <li><a href="manual/manual.xml#lcov" target="_blank">LCOV</a> for <a href="https://docs.sonarqube.org/latest/analyzing-source-code/test-coverage/javascript-typescript-test-coverage/" target="_blank">SonarQube</a></li>
            <li><a href="manual/manual.xml#coberturaXml" target="_blank">Cobertura XML</a> for <a href="https://www.jenkins.io/" target="_blank">Jenkins CI</a></li>
            <li><a href="manual/manual.xml#xmlSummary" target="_blank">XML summary</a> - coverage metric totals</li>
        </ul>
    </li>
</ul>
<h3>Other</h3>
<ul>
    <li>Quick and easy to set-up using a single JAR file</li>
    <li>JSCover will run anywhere Java does (requires minimum Java 21)</li>
    <li>Available via Maven repositories (see <a href="downloads.html">downloads page</a>)</li>
    <li>Maven plugins now available (see <a href="downloads.html">downloads page</a>)</li>
    <li>Usually requires no modification to existing tests (e.g. Jasmine, QUnit, Mocha, etc...)</li>
    <li>
        Can run in multiple modes:
        <ul>
            <li>Web-server  : runs as a web-server instrumenting JavaScript on the fly</li>
            <li>File-System : instruments JavaScript to the file-system</li>
            <li>Proxy-server: runs as a proxy-server instrumenting JavaScript on the fly</li>
        </ul>
    <li>JSCover is under active development</li>
    <li>
        JSCover is architecturally simple and modular, and so should be easy to
        contribute to and maintain, hopefully ensuring a long life-time
    </li>
</ul>
